package cn.bigfire.compiler.dragon.appendixA.handwrite.inter;

import cn.bigfire.compiler.dragon.appendixA.handwrite.lexer.Lexer;


public class Node {
    int lexLine = 0;

    public Node(){
        lexLine = Lexer.line;
    }

    public void error(String s){
        throw new Error("near line " + lexLine + ":" + s);
    }

    public static int labels = 0;

    public int newLabel() {
        return ++labels;
    }

    public void emitLabel(int i) {
        System.out.println("L" + i + ":");
    }

    public void emit(String string) {
        System.out.println("\t" + string);
    }

}
